'use strict';

module.exports = app => {
    return class AuthService extends app.Service {
        constructor(ctx) {
            super(ctx);
        }

        /**
         * 添加修改 如果id为空是添加id不为空是编辑
         * @param params
         * @returns {{}}
         */
        async get() {
            const result = await this.ctx.curl(this.app.urls('authorization'), {
                method: 'get',
                dataType: 'json'
            });
            return result.data;
        }

    }
};
